#pragma once
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <queue>
#define MaxInt 32767
#define MVNum 100
#define OK 1
typedef int Status;
typedef int VerTexType;
typedef int ArcType;

using namespace std;

typedef struct {
	VerTexType vexs[MVNum];
	ArcType arcs[MVNum][MVNum];
	int vexnum, arcnum;
}AMGraph;

typedef struct ArcNode {
	int adjvex;
	struct ArcNode* nextarc;
}ArcNode;

typedef struct VNode {
	VerTexType data;
	ArcNode* firstarc;
}VNode,AdjList[MVNum];

typedef struct {
	AdjList vertices;
	int vexnum, arcnum;
}ALGraph;

Status CreateUDN(AMGraph &G);
int LocateVex_AMG(AMGraph& G, VerTexType v);

Status CreateUDG(ALGraph& G);
int LocateVex_ALG(ALGraph& G, VerTexType v);